package com.device.operating.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.device.operating.entity.Fieldres;

public interface FieldresRepository extends PagingAndSortingRepository<Fieldres, String>{

	public List<Fieldres> findByFieldbelongAndIfshow(String fieldbelong,Boolean ifshow);//默认显示字段
	public List<Fieldres> findByFieldbelong(String fieldbelong);//所有字段
	public List<Fieldres> findByFieldbelongAndIfsecOrderByFieldnumAsc(String fieldbelong,Boolean ifsec);//默认选择字段
	@Query("select fieldres from Fieldres fieldres where fieldbelong=?1 order by abs(fieldId)")
	public List<Fieldres> findByFieldbelongabs(String fieldbelong);
	public List<Fieldres> findByFieldbelongOrderByFieldnumAsc(String fieldbelong);
	public Fieldres findByFieldbelongAndFieldcode(String dvbelong,String fieldcode);
}
